import { request } from '@/utils/request';

const Api = {
  List: '/present/record/list',
  add: '/present/record',
  info: '/present/record',
  batch: '/present/record/batch',
  'third-agency': '/present/record/third-agency',
};

// 列表
export function getList(params: any) {
  return request.get({
    url: Api.List,
    params,
  });
}

// 详情
export function getInfo(id: number | string) {
  return request.get({
    url: `${Api.info}/${id}`,
  });
}

// 修改
export function edit(data: any) {
  return request.put({
    url: Api.add,
    data,
  });
}

// 批量操作
export function batch(data: any) {
  return request.put({
    url: Api.batch,
    data,
  });
}

// 三方代付
export function thirdAgency(data: any) {
  return request.post({
    url: Api['third-agency'],
    data,
  });
}
